import request from '@/utils/request'
import { DictList } from "./types"


enum ApiPath {
  dictList = '/admin/cmn/dict/findByParentId'
}

/* 
GET /admin/cmn/dict/findByParentId/{parentId}
根据指定的父节点(字典项)的id, 得到子节点的列表
*/
export const reqGetDictList = (parentId: number) => {
  return request.get<any, DictList>(`${ApiPath.dictList}/${parentId}`)
}